package org.lsj.controller;

import com.sun.org.apache.regexp.internal.RE;
import org.lsj.entity.Province;
import org.lsj.service.ProvinceService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * @Author: Laishijin
 * @Email Lai_shijin@163.com
 * @Date: 2021/12/24 17:07
 */
@RestController
@RequestMapping("/province")
public class ProvinceController {
    private ProvinceService provinceService;

    public ProvinceController(ProvinceService provinceService) {
        this.provinceService = provinceService;
    }
    //    获取登记总人数
    @RequestMapping("/getTotal")
    public int getTotalPeople(){
        return provinceService.getTotalPeople();
    }
    //    获取有确诊人数
    @RequestMapping("/getConfirmed")
    public int getConfirmedPeople(){
        return provinceService.getConfirmedPeople();
    }
    //    获取无症状人数
    @RequestMapping("/getAsymptomatic")
    public int getAsymptomaticPeople(){
        return provinceService.getAsymptomaticPeople();
    }
    //    获取有症状人数
    @RequestMapping("/getSymptomatic")
    public int getSymptomaticPeople(){
        return provinceService.getSymptomaticPeople();
    }
    //    获取疑似病例
    @RequestMapping("/getSuspected")
    public int getSuspectedPeople(){
        return provinceService.getSuspectedPeople();
    }
    //    获取治愈病例
    @RequestMapping("/getCure")
    public int getCurePeople(){
        return provinceService.getCurePeople();
    }
    //    获取重症病例
    @RequestMapping("/getSevere")
    public int getSeverePeople(){
        return provinceService.getSeverePeople();
    }
    //    获取死亡病例
    @RequestMapping("/getDeaths")
    public int getDeathsPeople(){
        return provinceService.getDeathsPeople();
    }
    //    获取省份总病例
    @RequestMapping("getAllProvince")
    public List<Province> getAllProvincePeople(){
        return provinceService.getAllProvincePeople();
    }


}
